fix partition calc error