fix some startup errors