Fixed issue with partition indexing. Added some RPCs