Minor fixes to runtime definitions and the emitter