fixed to_integer/1 issue