fix warning to warn; add tests to improve code coverage