keepOverlay variable is never used.