bug fix

@vigsterkr 

Sorry for my mistake.
I forgot to record all the change in the previous PR.

please see the update for this PR.
Let me know if you have any question.