Added error checking for initial state of board