use hash["class"] instead of hash.class; hopefully fixes #24