Fixed the multiple extension checking mechanism.