Fix toArray assignment in stdfuns object