Issue 1316 and issue 1383

Tiny commit resolves these two issues.