fixed test_models and made timetolive test more reliable