trying to fix time frame bug