Fixes #1582