Applied patch for gotoFunction (thanks to krikrou)