The warning pop up

Please, please fix the bug that causes the: “Are you sure you want to close this image? Any unsaved changes will be lost.” pop up to appear even when one has saved the image. It doesn’t always appear, but it’s frequent enough to be a real annoyance. I’d be fine with and option to turn off all warnings as well. Thank you.