fix bug to deal with new changes