fixed typos and an mistake (corrected by Josh)