Fix score function: exp and log return valid values