Corrected an issue with function parameters