fix button stays in loading state after modal warning bug