Escape colname and fix historical field type bug