Fixing issues #743 and #720.