Fix the delete() bug about entity object