Dialog rotation fix, class regroup