handle the case where the amount is empty.
added a fix to round right.