[ui] fixed dialog button insertion (fixes #250)