Fighting Null Reference on termination
fixes user/repo#17