solving errors before publishing