Deployment bugs

Fixes some issues uncovered when deploying.