Fixed delta time bug