Fix for spawn and exit detection, improved example