bug fix #6