I have created a small python script to achieve this. Yes, it is very hacky.
You can use it as follows:
pushd ~/
wget https://gist.githubusercontent.com/mavaddat/f4f83b23386111bedd7f8199949601af/raw/b408efa0b707b0a86a95c0863847f41277a70e0b/fixSnaps.py
sudo python3 fixSnaps.py
popd
Additionally, add sudo python3 fixSnaps.py
to your ~/.bashrc
to immediately fix broken snaps upon bash initialization.