fixed partition detection logic