fixes some type mistakes