I'd start by removing attributes with names which differ only by cApITAlizaTION. That way madness lies, eve though its probably not your problem. I'd also be checking that ` departmentnumber' resolves to have values because it looks to me like it isn't.