Bug fix for random exercise generation