update code to fix bug
update code to fix bug