fix #29 formation adjust and deal null db