fix bugs exposed by fips