fixed some bugs in creating exercises