fix RuntimeError