Fixes graph hanging problem