fix predict/simulate-with-offset bugs