Changed model to use query estimation to use log, avoids underflows