fixed wrong appendMode in javascript