Fixed an undefined index