fix errors to compile