fixes a few issues with types - amazing they did not show up before!