fixed some bugs on deleting recently appended course