Fixed bug displaying success message on failure.