fixed issue on array handling