Added something to catch the first illegal move