Fix tests and suppress dead code error