fix some buggs