fixed some issues with the example