fix integration bugs