end array condition fix

end array condition fix