You don't say what doesn't work. And both sides of your <if> are pretty much the same. But it should be
<if $page eq "">
And the </fetch> needs to be inside the <if>. You have to following nesting rules. You can't intersperse opens and closes of procedural items.
In what context are you seeing unknowntype(82)? What procedure are you performing? What line of the script is the error on? What statement is on that line and maybe on lines before it?
Something like that doesn't usually show up in gw unless you have an old version and try to use -s on a table where they are blob fields.
Are you sure that's the command it's coming from and not one with a -s option? Was the database created by the same version of gw that you're using when you get the message? Please include the actual message and a few surrounding lines of output.