fix errors on gcc