Fixed bug in __reduce__ which led to problems with saving permutations
Fixed a few small bugs