fixed incorrect behavior during simulation