improved the line items backward compatibility, closes #6109