make sure that the header is always the first overlay and that null and undefined values don't appear in the first position of the ordered array