Fixed the snapshot bug

I also added tests to make sure it doesn't rear it's ugly head