diff --git a/source/f90/doeels.f90 b/source/f90/doeels.f90
index 81383c048a0d71d9b878ffcd85d07df87a4b47a9..273be7d7e2025f4a10e2817dbe593591d9168207 100644
--- a/source/f90/doeels.f90
+++ b/source/f90/doeels.f90
@@ -28,7 +28,7 @@ subroutine doeels (e0, theta, phia, phib, wmin, wmax, dw, comment, comment_size,
   double precision, intent(in out) :: wn_array(wn_array_size), f_array(wn_array_size)
 
   logical :: rational, user, debug
-  integer :: i, iw, lstart, neps, nofu, nout, nw, lmax
+  integer :: i, iw, neps, nofu, nout, nw, lmax
   double precision :: a, acoef, aerr, alpha, argmin, argmax, b, bcoef, beta,  &
       c1, c2, ccoef, cospsi, dlimf, dx, elleps, ener, epsmac, facru, f, f0,   &
       f1, fpic, fun, pi, prefac, psia, psii, qrat, rerr, ru, sinpsi, t,       &
@@ -77,7 +77,6 @@ subroutine doeels (e0, theta, phia, phib, wmin, wmax, dw, comment, comment_size,
   if (user) then
 
     if (layers == 1) rational = .true.
-    lstart = layers - nper + 1
     if (contrl == 'image') then
 ! *** image-charge screening factor
       if (layers == 1 .and. neps == 2) then