fix start and endkey