Changed type of ObjectKey to long; minor bug fixes