Fix up build errors, changes from Mahdi