Fix a few cape-related bugs.