fix feature indexing