Added patch to fix undefined index warning.