fixed piped input handling