Prevent double dialog on close/clean project