fixes for bugs 100, 133, 136