Added an isset check on custom  variable, avoiding PHP warnings