Fix a crash caused by functions with too many arguments