Bug obtaining reference code