Bugfix; array.to_h isn't available on all ruby versions. Changing to using Hash[] syntax.