Fixed an occasionally expressed bug in . Also a couple of variable renamings.