fixed npe in Location serialization