Fix unknown extensions handling. Thanks @xobb1t for the report.