avoid select repeated book, get history course bug fix