fix javascript output alignment bug