Fixed DB Error bug