fix bug js