fixes bug when pretty-printing an invocation