Fixing type generation and adding a global to example.