Various fixes in runtests