fix seg fault during offline step