possibly a small chance of a NPE error here, pipe could be null.