(DRAFT) Fixed type errors