fix bugs for integer