fix screen detection bug