small bugfix when setting ticks
Merge pull request #2 from uriba/master

Fixed a small bug when setting ticks