Fix error in overlay.js, improper function declaration.