fixes to runtime and preparations