Correct a few runtime issues