multi architecture driver on darwin, and some minor fixes