[opwig] Fixed metadata function return type.

Don't know if all cases are working.