fix bug

adjust code