int->long, and improvements to key/value stores
bugfix in key/value store