fix bug in making permute_bindings vastly more simple