cleanup write to argument array hack