The definition of ZPP seems to be
$$ZPP = RP \cap coRP.$$
I think ZPP should then be equivalent to P, because for any language L in ZPP, there is an algorithm A and B proving that it is in RP and coRP, respectively. Since A must tell for any x s.t. $x \notin L$ the truth and B for any x s.t. $x \notin L$ as well, we can just run both algorithms in polynomial time, and one of them has to give me the answer since these are the only two possible options.
Is there an error in my thoughts?