Errors check fixed