Some bug fixes for both high and low-level runtimes