unity5.4 and NGUI3.9.9 when call Screen.SetResolution game window black

Hi!
As it said in title, we build for standalone exe and have a requirement which can change window size by button.
So we use api Screen.SetResolution , it work fine in untiy 5.3.5 or before.
Recently we update to unity 5.4.0 , everything work fine but this api.
It seems UI dont refresh in time , our game window become black, like no cameras rendering.
We try reactive UI root then it appear again.
Any suggestions?

Change Graphics API to Direct3D11. It helped me.