fix some definer bugs