fix type-check false-positives and new tests