version 1.2. Fix several small bugs.