Fix windowing bug for graphs