Fixed Simulation bugs.