Fixed graph clearing