fixing modes name in detection function