check delete permission. fixes #181