Fixing more bugs

Fixed the total cost not subtracting any amount