fix a wrong parameter
minor change in file filter
remove a redundant assignment
remove a duplicate assignment
remove some redundant brackets
Merge pull request #5546 from chinhodado/fixes

some minor fixes and changes