round decimals and fix NaN issues