Fix type scope