Fix errrors on Firefox when dismiss toaster