Fixed add scripted method bug.