Fixed Dialog resize bug