Fix setup and installation

A couple of fixes based on reports from Umer.