fix for calculating minimum controller order