fixed an error in catch for firefox