fix unitialized variable problem in partition discovery