Bug fixing and structure improve