minor improvements in database handlers