bugfix for generating js files