Corrected error in parseAmount