min/max switch over bug fixed