fix type declarations