fix partition error handling