composite sample code fixes