code fix

fix bugs