Edit: Please looks at the image below. It is a better view
As shown in my render above, you can see the exhaust of the ship somehow protruding through the engines. The exhaust and the ship are separate render layers with the ship being above the exhaust. I have composited them with the Add node with the ship above the exhaust. It's not the ship's material as it not transparent and when they are on the same render layer it looks fine. My render layer properties look like this:
How can I make the exhaust go behind the ship, what am I doing wrong?
This is my compositor with the Alpha over node. I just added a few adjustments to the exhaust, but the problem persists.