fixed trailing zeros problems