fixed bug when a book cannot be found in mysql