Be more defensive in writing to the sig buffer