Fixes typo and type declaration issues.