Fix bugs, add sample better