Fixed problem when ST-Link is disconnected.