Fixing issue #335.
Fixing issue #336.