fixes many API problems found while working on Prisma