Fixed a bug when finding Hecke decomposition.