fixing a bug in the tick retrieval