made loading ui safe