Fixed possible error when an array with an empty value is returned