fix saving book in to memory