Fixing broken code sample