Fix type mistakes