Prevent bad ref