fix delta time bug