bugfix for backward simulation