Fix a bug when reshape with garray