Fixes array asign by function return