Fix an issue with the imagePath test (!isset($a) -> !$a)