fix to_hash
Merge pull request #1 from swistaczek/172-add_to_hash_opts

fix to_hash