Fixed #16 bug in preload slides calculation