preventing empty courses being saved