fix use of uninitialized value