fix calldepth bug in fatal and critical functions