Fixing minimum and maximum scanning