Fix bugs and improve test coverage for cfn.