fixing the bug for formatting amount