close #23. bug fix