Fix basic typechecking errors

Note to self: need to actually check the scripts compile before
releasing!

Signed-off-by: David Scott <dave.scott@eu.citrix.com>