fixed typos and dep loop