fix some segamention fault