fixing yet more bugs from last round of restructuring
(#387)