Fixing type mistakes