Though Andrew's suggestion will fix the problem the trick is to figure out how it got this way in the first place so that you can prevent it from happening again.
Are you using Moving Average costing? Is it possible that your other issue was not fully resolved as you thought?
Unfortunatley "how this occurred is hard to answer without seeing the data".