Fix to address #393. Passes local tests.