Small tidy up and code correction.