Fix throw new \InvalidArgumentException