Accessing wrong value