fix timing to expand a window