improving color handling, fixing field sorting