Added extension handling support