Do not set WM title when PDF object is an empty and don't leak memory