Fix behavior in case of too few slides