changed board size adjustement to be safe