Correcting ch22 sample in order to work with HaXML