fix issue with invalid amount