Fixed build errors/warnings