this doesn't ensure onAttach was called