fix deletion of unused points