use hash table for handle storage
fix newly introduced memleak in handle_execute_for_all