Fixed get_amount to return 0 on invalid input.