Fix and code simplification of fix for unused parameters