fix sorting arrays (bug in 5bd49a3)
normalize even more
add extension for type validation