Fix Connect off and Power off function