Fix IndexSizeError when turtle is moving backwards