Unify flat correction

Addresses #240.