fixed so that statements inside other statements don't trigger the showing of delete button for outer buttons