fixed bug in basis transformation that prevented kets from being transformed