Fixed a php notice for an undefined index