Fix bug in Unittest framework