Fix deleting entity with modified field

fixes #1237