Bug in selecting database group