Resize cache if necessary; fix popup clicks