fixed potential undefined index on path variable

We're getting undefined index errors on your last path variable update. I've put an isset around it. Thanks!