Fixed recursion in ErrorCheck class