Fix book spawning when wrapping around the world
Added an end event