Fixed bug in truncateTick