fix bug code