Fix a compile error when inheriting from template classes.
Fix a few bugs in the entity attribute grid.