A few bug fixes before building 1.1