fixing issue #396