Closes #1304 (both issues)

Thanks @dbuenzli for reporting so quickly