Fixed story ending logic