fixing the check