fixed integration bugs