fixed membership checking regex bug in courses model