Fixes undefined index warning