Fixing order of ui loading