solve many compilation erros