fix Cannot call method 'resume' of null; close #61