fixed a bunch of stuff for production deployment