fix partition bug