Fixed typos and logging