added an isset check on script enqueue to avoid the non existent array offset warning