unbind ended event after executing callback