fix errors mostly compilation