Added a couple of isset() checks to avoid php notices when running the plugin in a dev environment with strict errors on.