fixed undefined index notices