fix for undefined index notice