Fixed double window bug & lastpath.loc