Some corrects to mode callback