Fixed some more syntax and type errors