Fix pwd when new window