Fix introduced bug, add log variables