fixed minor bug in runlocal method