Fixed QString string formatting, added safety check in case the connection to the bridge might be lost.