fix preview window position problem