Fixed problem with state in book mode