fix bug with pop window