Fixing errors on gcc