fixed issued with deleting endpoints