Fix the entity parsing