RuntimeError issue solved