Updated timer logic

Fixes the issue where transitions can be too fast if an image takes a long time to be loaded.