Fix casting exception when returning string array

Tried to cast an array of Objects from an ArrayList of Strings to an
array of Strings