fixed bug with wrong available amount