Fixes type mistakes