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