fix issue when function definition line didn't end in , or ::