Prevents notice from being shown when index isn't defined

all said