finally fixed the check