Minor fixes to problems 23 and 24