fixes crash, close #4