fix some bugs in production environment