Minor change to 7segment

Modify if to take care of end condition of slider