Changed the bug of the cost