Minor bug fixes

here are the changes that I mentioned to Dominic and Chinmay today while we met.