Minor fixes to problem 18
Minor fixes to problem 19