Arrested inspite of Non bailable warrant being kept in abeyance

My wife filed a Maintenance Execution Case u/s crpc 125(3) for recovery of arrears granted as Interim Maintenance in Domestic Violence Case. It was mentioned in the order that the amount has to be adjusted against any other maintenance amount if she is getting from other cases. My wife was getting interim maintenance under Maintenance Case. Inspite of that, she filed a false petition for the DV interim maintenance claimimg that she hadn't received a penny from that case. I could not be present in the first two days of hearing of the Maintenance Execution (MEX) Case and the magistrate heard their story and issued a Non bailable warrant. After that I put up a petition mentioning that she had been receiving regular maintenance under Maintenance case and magistrate kept the warrant in abeyance. It was also mentioned in the order sheet. Inspite of all these, I am not sure how police got a Non bailable warrant against me for the same case and arrested me. I tried to show the order sheet for the MEX case but they didn't listen. I got released on prayer bond on the next day and magistrate said the warrant shouldn't have been executed as its mentioned in her order sheet that it should be kept in abeyance. Was my arrest legal as police is saying they had NBW against me? Now I want to take action against whoever is at guilty for this due to which I had to suffer. What shoule be done in this scenario.