fixed bug in stripping extensions