fix bug crash