Fix to emit function prototypes
Merge branch 'bug/function-prototypes'