fix bug #498

A quick change to fix the issue #498.