Fixes #1412 and Fixes #1413