fixed cal-on and critical id bug