fix arrow direction and node position