Fixing bug in extension detection when accessing /