remove unnecessary extensions