fixed a glitch in endpoint deletion