fixing issue with array conversions