Fix type incompatibility error