Fixed type check warning