- fixed undefined index warnings