Fix bug follow comment #6 issue 352