Fix debug image path bug. Add support for minimized windows.