Make dialog API's parameters more flexible.