Threw in some log commands and tried to fix it