Fix a bug in fastsim with shift.