fix some bugs in the interfaces implementation