Bugfix while obtaining the visible unit list in course views