Fix and close #47