fixed delete function variables