Bug in database variable