fixed issue when the screen is locked