fixed that errors-are-displayed-twice issue