fix a bug with empty input for awk