Improved example handling