Fixing bugs when simulating multiple return levels in a single call