fixed extension checking