Bug #1181, #1087

- Fixed bug #1181, probably a result of other compounded fixes (thanks to Max
  Muller).
- Fixed bug #1087, forgot to update changelog.