Fixed slow dialog apearing bug