fix js error: relative dir issue