Fix dynamic dropdown bug