fix a bug for feature computation