fixed deleteElement