Fixed errors with rounding and detecting dtypes