fixed recursive array issue