Another fix to format_entity