Prevents notice from being shown when index isn't defined
Merge pull request #1425 from rarila/avoid-notice

Prevents notice from being shown when index isn't defined