Code fixed to not run out of names/courses