Fix bug with slide # / slides # that was causing js to crash when preview of slide