fixed recursive unbind() to prevent binding conflicts