fix script error when favorites don't have a window or a path