Dialog crash fix