Fix samples bugs