fix APIs to work in production env