Fixed some problems causing build errors