heartthreader: fix nil pointer exception