fix bullet error, some refactor