Do not assume trailing callback in dialog API, fixes #395.