Fixed querying for customer if no deparmtnet was found;