Work around some bugs.