fixed a few bugs from the unittests

--HG--
branch : trunk
6 files changed