added janky firefox fix for ff getTotalLength bug