fixes issue #336

fixes issue #336