fix crashes when invalid board is given