fixed weird error that would occur with screenshots on some pages