Midi Inputs and Outputs Mixed Up

When I am trying to use a vst plugin instrument, the input and output devices seem to be mixed up. The input routing contains “1- (name of plugin) midi out”. And the output routing contains “1- (name of plugin) midi in” I have attached a snapshot to make things clearer.

Can anyone help?
Midi Mixup.JPG