Set first=false at the end of arrays.