fix with-db macro