type checking fix