Fix an issue that would reset controls on orientation change