Upon application of the assignee or receiver, the court shall vacate and set aside all attachments, executions, sequestrations or other legal proceedings not wholly completed, and all money in court or in the hands of the sheriff, by virtue thereof, shall be paid to such assignee or receiver. The assignee or receiver shall pay out of so much of the insolvent's estate as was attached, sequestered or levied upon, or was received from the court or sheriff, the legal cost of such vacated proceedings, as a preferred claim if the creditor's claim is afterwards allowed in the distribution of the insolvent's estate; and the creditor's claim shall also be paid thereout, if it shall be decided that, notwithstanding the provisions of this act, he was entitled to a preference.
39 P.S. § 49