fixed undefined index notice