delete content function bugfix