Use sha1, not data[sha1], so its always set