Fix bug with extension filtering