Added orientation fix for graphs.