Fixed database error during automated creation of episodes