several fixes for adapting scenario.py