Fixed query bug in add book page