fix a bug with findRecord and not providing lastRecord