Fix a nasty bug.