Fix build errors, remove previous workarounds.