r2: made the extension checker a bit more sane