Fixed the first example (thanks @nakajima).