Fixed register student error

Register student not works and adds teachers and courses to respective
lists