Switched time query method and fixed horrifying bug