fix potential seg fault in my patch that just went in, oops