cleanup undefined index/variable warnings