Closes bugs #1672 and #1673