Minor fixes to Chris' code