fixed bug with unbind()