Additional fixes proposed by Aashish - thanks!