Fixes #1585