refs #2. fix a bug.