fixed slide counter so that it calculates properly