Fix integration bugs