Fixed sample bugs