Fix bug preventing validation of entities