Fix foreign key bug

Fixed bug where children of students folders could not be deleted.