Fix bugs, update examples