Fixed bug in edit_course