fix check in error