remove undef if it's in the array