Some improvements of errors revealed after the refactoring