bug fix #40