Fixes #670.