Fixes #407.