improve the performance of the get_hash_range function and some other minor changes
fixed an issue caused by the change of the select_hash function
minor fixes