fixed two issues: didn't stop on ctrl+c, too big cpu load