fix for invalidExtension helper
refactoring options