Fix guess_default function