Fix round function bugs