Issue #1593 and #1605

Sorry, something with git went wrong, so you get two for price of one :-)