Fix logic error, add a success message.