fixed crash when opening book