fixed some typos and warnings