fix argparsing for piped input