FIX: bug in bad_channels rank criterion