fixed error with uninitialized values