fix with timer where smaller end time would behave wrong