Use a more reliable reference to the textfields.

This makes the example actually work!