Fixed minor bugs affecting runtime.