Fix courses mode switching bug