fix bad ref