Fix bug with delete books form related tables