fix bug for issue 37