fixed issue with custom objects returning hashes