fixed some bugs in edit controllers