correcting paths for javascript