support select keys for query and other fix