Legacy runtime warning fixes