fix some semi bugs