Fix rect integration