fixed the withLocals directive.