small bugfix when setting ticks