Fix bug in pretty-printing function applications