=Added boundaries check to reproduction