fixing message to select function (was "type" but should have been "mode")