Fix arrow functions

Fix createArrow functions
Fixes #1834