fix graph not updating