Update from code to match api changes