Fixed hardcoded index filtering. This resolves #32