fix setup db code