fixed bug in unbind