Fixed type bugs.