fixed bug with duplicate js compiling