Fixes for bugs 65, 66