fixed a bug for links where the source node is of type input