fix bug serialize