fix errors that gcc finds