fixing /p and _blank errors