Fixed the entity parsing in parser