Correct bugs preventins save of bridges from working ($scope.debug() fix for debug() and "msg" in place of "data").