Change locals_to_hash to block_to_hash