fix startup errors.