bugifix for ticket 99.0-does-not-exist
refactoring for the case that array contains only 1 element
return array instead of nil