Fixing various issues with deployment