fix urgent bug for issue #44