Adjusted to api changes
Fixed conflicts