Fixed error paths during attach/detach and fixed a per line listen detach bug