fix bugs in unit 2 (reported by Gail Adler)