fix array size bug. integrate with cloud test