fixed getRecord and tests