fix some bug for transfer