Fix typo in toReal, toInt definition