Logic error in interface check