Fixes success message shown if there are warnings.

A previous commit had included a typo that caused a success message to be shown even if there was a warning. This fixes that.