Fix application freezing on close after saving .xcf