graph orientation fix