Corrected bug in the createIdea function