fix bug where client-side freedom.js loses callbacks