Fixed potential nil access.