fix warning unedefined index