fix issue #1919

change code to fix issue #1919