partitioning bug fix