Fixed a small bug when setting ticks

Hi,
I've taken the liberty to fix this tiny bug.
Have a nice day,
Uri