Fix type checks