fix feature calculation