Fix comparison of returned hash with expected hash