check target exists before calling removeListeners; update to use
attached/detached