Restating/expanding on what WCC said...think of any contributions made as estimates. When you are basing things on annual pay, but contributing each payroll, you are prefunding on an estimated basis. Figure out who had the highest percentage based on annual pay, and then adjust everyone else up to that.
It sounds like they just prefunded a plan year match. Plan year match formula is still in place and the employer needs to decided what the discretionary formula will be for the year. Once that formula is determined, they need to make adjustments (at year end) to the each account in accordance with the formula.