Fixed type errors --- viva la type checker