fixed a bug with the story code.