minor bug (toInt)