Fix build errors / warnings