fixed issues with empty courses causing errors