fixed some bugs in delegates