fix error when checking language for cached category/page