fixed a bug in course sql.