fixed arguments is not an array error