Update main.js

Fix public publishing in client.