Fixed type errors, should compile now.