LiquidCrystal library

Hellow !

I have an issue with my Arduino's LCD.

I'm controlling a DC motor and i need to display motor's RPM and the PWM pulse lenght.
To print the PWM lenght, i use this code :

lcd.setCursor(0,0);
lcd.print(potValue);

The code works, but if i go up to 254 and than i come back to less then 100, i have on the display, for example, 400 instead 40, or 340 instead 34.

With the RPM i have the same problem. If i go up to 3000 and the i come back to less then 1000, for example 800, my LCD print 8000.

How can i resolve the problem ?

TNX !