Fix of notices Undefined index on lines 176 and 235