One more fix in javascript slider calculation (part 3)