fix error checker