Fix issue javascript