bug fixes from Natasha's list