fixed connection bug when turning screen off