Don't hang when restarting process

@andrewmacp: