Merge Doug's fixes

Build and error message fixes