Bleed the system , motors ,valve packs in fact anywhere air can hide , check it, bleed it again, check it , then bleed some more
comp up as required
replacing pumps can be a hassle if lots of air in the system , Dont panic ,think clearly and logically. and make sure you understand why original fault happened or you will be chasing red herrings on a wild goose chase.