Some fixes in samples