fixed changeConnectedWidget method