fix bugs caused in production environment.