Fixed errors associated with null dialog panel