Getting a string instead of array