has_key fix and other order related updates