fix missings and empty array