Try to fix bug when array is passed as function param