Fixed all bugs for book mode