diff --git a/src/index.ts b/src/index.ts
index 203cc1b5b3a603ec68536b0a553d969c5abd5b1e..dec245353b5f93a865bd3a38aaa88432db459112 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -101,14 +101,19 @@ async function run(inputDir: string, outputDir: string, options: CliOptions) {
 
                     function getNum(x: Resolution) {
                         return parseInt(
-                            x.number.match(/\.(\d+)[PFB]?$/)?.[1],
+                            x.number.match(/\d+\.(\d+)[PBF]?/)?.[1],
                             10,
                         );
                     }
 
+                    function getType(x: Resolution) {
+                        return x.number.match(/\d+\.\d+([PBF]?)/)?.[1];
+                    }
+
                     // This works because `0` and `NaN` are falsy. :)
                     return (
-                        tOrder[b.type] - tOrder[a.type] || getNum(b) - getNum(a)
+                        tOrder[getType(b)] - tOrder[getType(a)]
+                        || getNum(b) - getNum(a)
                     );
                 }),
             },