I think in this function you should set hasControl to false perhaps.  At the very least we need to check for when a new board is connected and reset the mode then.