flipped allowEmpty to preventEmpty