fix bugs in production env