minor bug in database fix