Fixing the problems in the example