fixes for bugs 194, 160