patch for gotoFunction