Fixes #1432, #1413