clean up the dirty flag correctly in Entity.prototype.resolve
fix parser to properly create attributes for simple entities