[Bug 761] Window computation is wrong