add db, fixed bug button check