Fixing issues #200 and #199.