Fixed issue with adding elements to array. Stupid PS!