Minor changes to work out a couple bugs