fixed unwanted null instead of array in rare cases