add timeout, ensure NOTICE updated, fix leak