More fixes to make the code to sample to compile correctly