remove bad ref to function