fix for the issue #345

fix for the fails in #345