Fixed off-by-one at the end of slider