Fixed layout issues in graphs