Fix undefined index notices.