bugfixing and raise when test coverage is too low