Fixed 'Undefined index' notice