bug fix 4074

This bug has been introduced by b53dbc27350519128c242010851448b3f3b04750 commit. I have provided a fix for it.
Thanks.