As we mentioned in this guide, it is important to delete the rule with a bigger index number first. So, just run:
$ sudo ufw delete 8
$ sudo ufw delete 3