Avoid repeated work.
Fix type error.