some fixes on partition