Updated to work with teapot 0.6.