fixed a bunch of typeof mistakes