Fixes some startup errors