fix errors, @lindahua's suggestion