switch setApp call to after config init