fix notice undefined index