Merge "Use correct state when calling getZ"