Fix database tests