fixed the bugs reported from gongyuan