When you first click 'fill spaces', you will have had an undo button. But, once you refresh your page this is gone, so look out for this going forward if you make this error.
However to fix this once you can no longer "undo" Go to Reporting>Reports>Attendance>Attendance Audit and you will see what codes were before you bulk filled.
Please refer to - Attendance Audit Report
Use this as guidance when re populating the register in Register > Manage Register.
Please Note: be aware when using 'fill spaces', it will fill the entire date range you have on your page so you need to adjust the dates before hand the prevent this going forward.