fix bug in prior commit. see comment in text.