Added detection to endure that Delete button should only show up in the edit page