Minor improvements in "showOverlay" method.