Fix wrong frame being loaded sometimes