Set correct mode in Pipe constructor