fixed bug introduced in last release

null value causing problems under some circumstances