fix #20 again, the logic of remove/addXXXHandlers is not correct