Fix type spec, fix a behaviour warning.